#ifndef ALGORITHM_H
#define ALGORITHM_H
#include <math.h>
#include <stdint.h>

typedef struct 
{
    int32_t x;
    int32_t y,lp_y;
    int16_t a;
		uint8_t precision;
}filter_int_t;

void filter_init(filter_int_t *filter_int,float a,uint8_t precision);
int32_t filter_lp(filter_int_t *filter_int,int32_t input);
int32_t filter_hp(filter_int_t *filter_int,int32_t input);

int32_t linear_interpolation(int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x);
#endif
